<script src="../../config.js"></script>
<script src="../../public/js/main.js"></script>
<script src="../../routers/api.js"></script>
<script src="../../routers/admin.js"></script>{% extends 'layout.html'%}
{% block title%}用户列表{%endblock%}
{% block scripts%}
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>
{%endblock%}
{% block body%}
<table class="table table-hover table-striped">

    <tr>
        <td>类别</td>
        <td>文章数</td>
        <td>操作</td>

    </tr>
    {% for label in categorys %}
   <!-- <button class="btn btn-primary" type="button">
        label.name <span class="badge">X</span>
    </button>-->
    <tr>
        <td>{{label.name}}</td>
        <td>{{label.articleNumber}}</td>
        <td>
            <a href="/admin/category/change?id={{label._id.toString()}}">更改</a>||
            <a href="/admin/category/delete?id={{label._id.toString()}}">删除</a>
        </td>
    </tr>
    {% endfor%}
</table>
<nav aria-label="...">
    <ul class="pager">
        <li><a href="/admin/category?page={{page-1}}">上一页</a></li>
        {{page}}/{{maxPage}}
        <li><a href="/admin/category?page={{page+1}}">下一页</a></li>
    </ul>
</nav>

{% endblock%}